package com.dj.core.entity.tool;

import net.sf.cglib.beans.BeanCopier;

import com.dj.domain.entity.DaiJiaUser;
import com.dj.domain.user.LoginUserInfo;

/**
 * 类UserCopier.java的实现描述：TODO 类实现描述
 * 
 * @author jasen.hsu.cn@gmail.com 2012-4-18 上午10:36:31
 */
public class UserCopier {

    /** 将jobsuser(DO)数据转化为LoginUser */
    private static BeanCopier userDo2LoginUser = BeanCopier.create(DaiJiaUser.class, LoginUserInfo.class, false);

    public static void convert2LoginUser(DaiJiaUser jobsUser, LoginUserInfo loginUser) {
        if (jobsUser == null) return;
        if (loginUser == null) loginUser = new LoginUserInfo();
        userDo2LoginUser.copy(jobsUser, loginUser, null);
    }

}
